#!/bin/bash

yum -y install  wget unzip

wget https://gitee.com/zzhlinux911218/software/repository/archive/master.zip --no-check-certificate
unzip master.zip;cd software
mv node-v0.10.0-linux-x64.zip /mnt/
cd /mnt/
rm -rf master.zip software/
unzip node-v0.10.0-linux-x64.zip

mv node-v0.10.0-linux-x64 nodejs
mv nodejs/  /etc/
echo 'export NODE_HOME=/etc/nodejs'  >>  /etc/profile
echo 'export PATH=$PATH:$NODE_HOME/bin' >>  /etc/profile
cp  /etc/nodejs/bin/node  /usr/bin/
chmod +x /usr/bin/node
cd /mnt
rm -rf node.sh  node-v0.10.0-linux-x64.zip
clear
which node

